package com.oa.service.impl;

import java.util.List;

import javax.annotation.Resource;
import javax.annotation.Resources;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.oa.bean.Privilege;
import com.oa.bean.Role;
import com.oa.bean.RolePrivilege;
import com.oa.dao.IndexDao;
import com.oa.service.SystemService;

@Service("systemServiceImpl")
public class SystemServiceImpl implements SystemService{

	@Resource
	private IndexDao indexDao;
	
	@Override
	public List<Role> selectAllRoleList() {
		// TODO Auto-generated method stub
		return indexDao.selectAllRoleList();
	}
	@Override
	public Role selectRoleById(int parent) {
		// TODO Auto-generated method stub
		return indexDao.selectRoleById(parent);
	}
	@Override
	public List<String> selectCheckedPrivilegeId(int roleId) {
		// TODO Auto-generated method stub
		return indexDao.selectCheckedPrivilegeId(roleId);
	}
	@Override
	public List<Privilege> selectPrivilegeTopList() {
		// TODO Auto-generated method stub
		return indexDao.selectPrivilegeTopList();
	}
	@Override
	public List<Privilege> selectPrivilegeById(int[] id) {
		// TODO Auto-generated method stub
		return indexDao.selectPrivilegeById(id);
	}
	@Override
	public int ainsertPrivilegeIds(RolePrivilege rolep) {
		// TODO Auto-generated method stub
		return indexDao.ainsertPrivilegeIds(rolep);
	}
	@Override
	public int deletePrivilege(int pid) {
		// TODO Auto-generated method stub
		return indexDao.deletePrvilege(pid);
	}
	@Override
	public List<Privilege> findAllPrivilegeUrl() {
		// TODO Auto-generated method stub
		return indexDao.findAllPrivilegeUrl();
	}
}
